package Demo0;

import java.io.File;
import java.util.Scanner;

public class FileSearch {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.println("请输入想要搜索的文件夹：");
        File file=new File(input.next());
        File[] files=file.listFiles();
        for(File file1:files){
            if(file1.isDirectory()){
                System.out.println(file1.getName());
            }
        }
        for(File file2:files){
            if(file2.isFile()){
                System.out.println(file2.getName());
            }
        }
    }
}
